package com.ruoyi.framework.dataScope.strategy;

import com.ruoyi.project.system.domain.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Classname AllDataScope
 * @Description 所有
 * @Author Created by Lihaodong (alias:小东啊) lihaodongmail@163.com
 * @Date 2019-06-08 16:27
 * @Version 1.0
 */
@Component("1")
public class AllDataAuth implements AbstractDataAuthHandler {

    @Autowired
    @Qualifier("masterJdbcTemplate")
    private static JdbcTemplate jdbcTemplate;


    @Override
    public List<Long> getDeptIds(SysRole role, String scopeType) {
        String sql="select dept_id as deptId from sys_dept";
        List<Long> longs = jdbcTemplate.queryForList(sql, Long.class);
        return longs;
    }

}
